<#include "header.htm"/>

<script type="text/javascript" src="${contextPath}/templates/${templateName}/js/jquery.js?${startupTime}"></script>

<script type="text/javascript">
<!--
<#include "js/utils.js"/>

-->
</script>

<table cellspacing="10" cellpadding="1" width="50%" align="center" border="0">
    <tr>
      <td align="left">
      <span class="nav">
      <a class="nav" href="${JForumContext.encodeURL("/forums/list")}">${I18n.getMessage("ForumListing.forumIndex")}</a>&raquo;
      <a class="nav" href="#">${I18n.getMessage("UserProfile.profileFor")} : ${u.username}</a>
      </span></td>
          
    </tr>
</table>

<table class="forumline" cellspacing="1" cellpadding="3" width="50%" align="center" border="0">

	<tr>
		<td class="catleft" align="center" width="100%" height="28"><b><span class="gen">${I18n.getMessage("UserProfile.avatar")}</span></b></td>
   </tr>

	<tr>
		<td class="row1" valign="top" align="center" height="6">
			<#if (u.avatar?exists && u.avatar?length > 0)>
				<#if u.isExternalAvatar() || u.avatar.startsWith("http://")>
					<#if avatarAllowExternalUrl>
						<img src="${u.avatar}" border="0">
					</#if>
				<#else>
					<img src="${contextPath}/images/avatar/${u.avatar}" border="0" /><br />
				</#if>
		    <#else>
		        这个家伙很懒，没有设置头像
		        
			</#if>
		</td>
  </tr>
  <tr>
  <td class="catleft" align="center" ><b><span class="gen">${I18n.getMessage("UserProfile.allAbout")} ${u.username}</span></b></td>
  </tr>

  <tr>
		<td class="row1" valign="top" >
			<table cellspacing="1" cellpadding="3" width="100%" border="0">
			    <tr>
					<td valign="middle" nowrap="nowrap" align="right"><span class="gen">${I18n.getMessage("PostShow.ranking")}:&nbsp;</span></td>
					<#if rankImageEnabled>
					<td width="100%"><img src="${rank.getRankImage(u.rankId,u.totalPosts)}" /></td>
					<#else>
					<td width="100%"><b><span class="gen">${rank.getRankTitle(u.rankId, u.totalPosts)}</span></b></td>
				    </#if>
				</tr>
				<tr>
					<td valign="middle" nowrap="nowrap" align="right"><span class="gen">${I18n.getMessage("UserProfile.registrationDate")}:&nbsp;</span></td>
					<td width="100%"><b><span class="gen">${u.registrationDate}</span></b></td>
				</tr>
				

				<tr>
					<td valign="top" nowrap="nowrap" align="right"><span class="gen">${I18n.getMessage("ForumListing.userCreatedTopics")}:</span></td>
					<td>
						<#if (ntopics > 0)>
							<b><a class="gen" href="${JForumContext.encodeURL("/recentTopics/showTopicsByUser/${u.id}")}">[${ntopics}] ${I18n.getMessage("ForumListing.userTopics")?html} ${u.username?html}</a> </b>
						<#else>
							<span class="gensmall">${I18n.getMessage("ForumListing.noUserCreatedTopics")}</span>
						</#if>
						</td>
				</tr>
								<tr>
					<td valign="top" nowrap="nowrap" align="right"><span class="gen">${I18n.getMessage("UserProfile.totalMessages")}:&nbsp;</span></td>
					<td valign="top">
						<#if (nposts > 0)>
							<b><a class="gen" href="${JForumContext.encodeURL("/posts/listByUser/${u.id}")}">[${nposts}] ${I18n.getMessage("PostShow.userPosts")} ${u.username?html}</a> </b>
						<#else>
							<span class="gen">${I18n.getMessage("PostShow.noUserCreatedPosts")}</span>
						</#if>
					</td>
				</tr>
				<#if (u.from?exists && u.from?length > 0)>
				<tr>
					<td valign="middle" nowrap="nowrap" align="right"><span class="gen">${I18n.getMessage("UserProfile.from")}:&nbsp;</span></td>
					<td><b><span class="gen">${u.from}</span></b></td>
				</tr>
				</#if>
            
				<#if (u.webSite?exists && u.webSite?length > 0)>
				<tr>
					<td valign="middle" nowrap="nowrap" align="right"><span class="gen">${I18n.getMessage("UserProfile.webSite")}:&nbsp;</span></td>
					<td><span class="gen"><b><a href="${u.webSite}" target="_new">${u.webSite}</a></b></span></td>
				</tr>
				</#if>
            
				<#if (u.occupation?exists && u.occupation?length > 0)>
				<tr>
					<td valign="middle" nowrap="nowrap" align="right"><span class="gen">${I18n.getMessage("UserProfile.occupation")}:&nbsp;</span></td>
					<td><b><span class="gen">${u.occupation}</span></b></td>
				</tr>
				</#if>
            
				<#if (u.interests?exists && u.interests?length > 0)>
				<tr>
					<td valign="top" nowrap="nowrap" align="right"><span class="gen">${I18n.getMessage("UserProfile.interests")}:</span></td>
					<td><b><span class="gen">${u.interests}</span></b></td>
				</tr>
				</#if>
            
				<#if (u.biography?exists && u.biography?length > 0)>
				<tr>
					<td valign="top" nowrap="nowrap" align="right"><span class="gen">${I18n.getMessage("UserProfile.biography")}:</span></td>
					<td><b><span class="gen">${u.biography}</span></b></td>
				</tr>
				</#if>

				<#if bookmarksEnabled && DisplayBookEnable>
				<tr>
					<td valign="top" nowrap="nowrap" align="right"><span class="gen">${I18n.getMessage("Bookmarks.myBag")}:</span></td>
					<td>
						<#if (nbookmarks > 0)>
							<b><a class="gen" href="${JForumContext.encodeURL("/bookmarks/list/${u.id}")}">[${nbookmarks}] ${I18n.getMessage("Bookmarks.for")} ${u.username?html}</a> </b>
						<#else>
							<span class="gensmall">${I18n.getMessage("Bookmarks.empty")}</span>
						</#if>
					</td>
				</tr>
				</#if>
				
				
			</table>
		</td>
	</tr>
	 <tr>
	<td class="catleft" align="center" height="28"><b><span class="gen">${I18n.getMessage("UserProfile.contact")} ${u.username}</span></b></td>
	</tr>
	  <tr>
		<td class="row1" valign="top" >
         <table cellspacing="1" cellpadding="3" width="100%" border="0">
			<#if u.id != 1>
			<tr>
				<td valign="middle" nowrap="nowrap" align="right"><span class="gen">${I18n.getMessage("UserProfile.privateMessage")}:</span></td>
				<td class="row1" valign="middle">
					<b><span class="gen">
					<a href="${JForumContext.encodeURL("/pm/sendTo/${u.id}")}" class="icon_pm"><img src="${contextPath}/images/transp.gif"  alt="" /></a>
					</span></b>
				</td>
			</tr>
			</#if>
				
			<#if (u.isViewEmailEnabled() && u.email?exists && u.email?length > 0)>
			<tr>
				<td valign="middle" nowrap="nowrap" align="right"><span class="gen">${I18n.getMessage("UserProfile.emailAddress")}:</span></td>
				<td class="row1" valign="middle" width="100%">
					<b><span class="gen">
					<#assign e = u.email.split("@")/>
					<a href="#" onclick="document.location = 'mailto:' + showEmail('${e[0]}', '${e[1]}');"><img src="${contextPath}/templates/${templateName}/images/icon_email.gif" border="0" /></a>
					</span></b>
				</td>
			</tr>
			</#if>
 			
			<tr>
				<td valign="middle" nowrap="nowrap" align="right"><span class="gen">${I18n.getMessage("ForumBase.user.addToFriends")}:</span></td>
				<td class="row1" valign="middle" width="100%">
					<b><span class="gen">
							<a href="javascript:addfriend('${u.id}');"><img src="${contextPath}/templates/${templateName}/images/add_friends.gif" alt="[加为好友]" /></a>
					</span></b>
				</td>
			</tr>
 
	</table>
	</td>
	</tr>


</table>
<#include "bottom.htm"/>
